#ifndef LOGINWIDGET_H
#define LOGINWIDGET_H

#include <QWidget>
#include<QMouseEvent>
#include"reg.h"
#include "srchpassword.h"
#include"chatlist.h"
#include<QVector>
#include"chat.h"
#include"setnetwork.h"
#include<QTcpServer>
#include<QTcpSocket>
#include "pass.h"

QT_BEGIN_NAMESPACE
namespace Ui { class loginwidget; }
QT_END_NAMESPACE

class loginwidget : public QWidget
{
    Q_OBJECT

public:
    loginwidget(QWidget *parent = nullptr);
    ~loginwidget();
protected:
    void mouseMoveEvent(QMouseEvent *e);//通过移动鼠标进行窗口的移动
    void mousePressEvent(QMouseEvent *e);//通过按下鼠标获取该点的坐标

private slots:
    void on_close_clicked();

    void on_min_clicked();

    void on_loginbtn_clicked();


    void on_account_currentTextChanged(const QString &);
    void regdeal(QString str1,QString str2,QString str3,QString str4);
    void dealcreate(QString str);

    void on_net_clicked();




private:
    Ui::loginwidget *ui;
    QPoint p;
    reg reg;
    srchpassword search;
    chatlist chatlist;//有一个成员是chatlist
    QString accountnum;
    QString password;
    static int usersnum;
    QVector<QString> dewnname;
    QVector<QString> phonenum;
    QVector<QString> userpass;
    QVector<QString> useraccount;


    setnetwork netbox;
    QString namedewn;
    pass pass;
signals:




};
#endif // LOGINWIDGET_H
